cmake_minimum_required(VERSION 3.0.0)

project(osgStudy)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/modules)

# openscenegraph组件
set(OSGComponents osgDB osgGA osgUtil osgText osgViewer osgWidget)
find_package(OpenSceneGraph 3.6.0 REQUIRED ${OSGComponents})

# qt 组件
set(QtComponents Widgets Core Gui OpenGL)
find_package(Qt5 REQUIRED ${QtComponents})

# osgQt库
find_package(osgQt)

# Qt相关设置
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

# 全局设置头文件搜索路径和依赖库
include_directories(
    ${OSG_INCLUDE_DIR} 
    ${OSGQT_INCLUDE_DIR}
)


link_libraries(
    ${OPENSCENEGRAPH_LIBRARIES} 
    ${OSGQT_LIBRARY} 
    Qt5::Widgets 
    Qt5::Core 
    Qt5::Gui 
    Qt5::OpenGL
)

# beginner-guide书籍章节学习
add_subdirectory(beginner-guide)
